<template>
    <div class="receiveItem_r">
      <w-button
        @click="handleReturn"
        class="return_btn"
        type="primary"
        icon="el-icon-arrow-left"
        >上一页</w-button
      >
      <Item :detail="detail" :activity="activity"></Item>
    </div>
</template>

<script>
import Item from "../components/Item";
export default {
  name: "ReceiveItem",  
  components: { Item },
  props: ["id"],
  data() {
    return {
      detail: {
        car: {},
        currentIndex: 0,
        employee: {},
        finishTime: null,
        height: 0,
        id: "",
        length: 0,
        orderTime: null,
        receiveAddress: {
          address:"",
          name:"",
          phone:""
        },
        receiveName: "heng",
        records: [],
        route: "",
        sendAddress: {
          address:"",
          name:"",
          phone:""
        },
        sendName: "",
        status: "",
        type: "",
        uid: "",
        value: 0,
        weight: 0,
        width: 0,
      },
      activity:[]
    };
  },
  mounted() {
    this.$axios({
      method: "GET",
      url: "http://1.15.170.222:88/api/order/getOrderByOid/" + this.id,
    }).then((response) => {
      console.log(response);
      this.detail = response.data.data;
      this.activity  = response.data.data.records
    });
  },
  methods: {
    handleReturn() {
      this.$router.push({
        name: "shouhuo",
      });
    },
  },
};
</script>

<style>
.receiveItem_r {
  padding-top: 30px;
  padding-left: 130px;
  display: flex;
  flex-direction: column;
  width: 900px;
  height: 700px;
}
.return_btn {
  padding-left: 10px;
  padding-top: 8px;
  height: 30px;
  width: 90px;
  justify-content: center;
}
</style>
